home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / DevCon / SanFrancisco_1989 / SF-Devcon89.2 / Debug / RawPrintf.asm < prev    next >
Encoding:
Assembly Source File  |  1992-08-26  |  940 b   |  43 lines

  1. *************************************************************************
  2. *
  3. * _RawPrintf.asm  - Self-contained printf clone.  Formatted strings
  4. *            are sent directly out the serial port.  Xon/Xoff
  5. *            handshake is supported.
  6. *            This function may be called at any time, including
  7. *            interrupts.
  8. *
  9. *    Bryce Nesbitt, 02-24-89
  10. *
  11. *************************************************************************
  12.  
  13.         XREF    _LVORawDoFmt
  14.         XDEF    _RawPrintf
  15.  
  16. _RawPrintf:
  17.         movem.l a0/a1,-(sp)
  18.         move.l    4*3(SP),A0      ;grab format string
  19.         lea.l    4*4(SP),A1      ;grab stack address of parameters
  20.         movem.l A2/A3/A6/D0/D1,-(SP)
  21.         move.l    4,a6
  22.         lea.l    PSCODE(pc),a2
  23.         suba.l    a3,a3
  24.         jsr    _LVORawDoFmt(A6)
  25.         movem.l (SP)+,D0/D1/A2/A3/A6
  26.         movem.l (sp)+,a0/a1
  27.         rts
  28.  
  29.  
  30. PSCODE:     move.w    $DFF018,d1
  31.         btst    #13,d1
  32.         beq.s    PSCODE
  33.         and.b    #$7f,d1
  34.         cmp.b    #$13,d1 ;Check for Xoff
  35.         beq.s    PSCODE
  36.         and.w    #$ff,d0
  37.         or.w    #$100,d0
  38.         move.w    d0,$DFF030
  39.         rts
  40.  
  41.         END
  42.  
  43.